/**
 * @(#)ExecutionVO.java Jan 22, 2010
 *   
 * Copyright  (c) 2009-2010 Wilmar IT Service,  Inc.   
 * All  rights  reserved.   
 * TODO
 */

package com.wilmar.process.entity.vo;

import java.util.Set;

import org.jbpm.api.Execution;

/**
 * @author MaKuBEX Email:makubexnet@gmail.com
 * @version 1.0.0
 */
public class ExecutionVO extends AbstractValueObject implements ValueObject {

	/**
	 * @serialField
	 */
	private static final long serialVersionUID = 5338473557236466842L;

	private String id;
	private Set<String> activeActivityName;
	private Boolean isProcessInstance;
	private String key;
	private String name;
	private String processDefinitionId;
	private int priority;
	private String state;
	private boolean ended;
	private boolean suspended;

	public ExecutionVO(Execution execution) {
		this.id = execution.getId();
		execution.findActiveActivityNames();
		execution.getIsProcessInstance();
		execution.getKey();
		execution.getName();
		execution.getProcessDefinitionId();
		execution.getPriority();
		execution.getState();
		execution.isEnded();
		execution.isSuspended();
	}

	/**
	 * @return the id
	 */
	public String getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(String id) {
		this.id = id;
	}

	/**
	 * @return the activeActivityName
	 */
	public Set<String> getActiveActivityName() {
		return activeActivityName;
	}

	/**
	 * @param activeActivityName
	 *            the activeActivityName to set
	 */
	public void setActiveActivityName(Set<String> activeActivityName) {
		this.activeActivityName = activeActivityName;
	}

	/**
	 * @return the isProcessInstance
	 */
	public Boolean getIsProcessInstance() {
		return isProcessInstance;
	}

	/**
	 * @param isProcessInstance
	 *            the isProcessInstance to set
	 */
	public void setIsProcessInstance(Boolean isProcessInstance) {
		this.isProcessInstance = isProcessInstance;
	}

	/**
	 * @return the key
	 */
	public String getKey() {
		return key;
	}

	/**
	 * @param key
	 *            the key to set
	 */
	public void setKey(String key) {
		this.key = key;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the processDefinitionId
	 */
	public String getProcessDefinitionId() {
		return processDefinitionId;
	}

	/**
	 * @param processDefinitionId
	 *            the processDefinitionId to set
	 */
	public void setProcessDefinitionId(String processDefinitionId) {
		this.processDefinitionId = processDefinitionId;
	}

	/**
	 * @return the priority
	 */
	public int getPriority() {
		return priority;
	}

	/**
	 * @param priority
	 *            the priority to set
	 */
	public void setPriority(int priority) {
		this.priority = priority;
	}

	/**
	 * @return the state
	 */
	public String getState() {
		return state;
	}

	/**
	 * @param state
	 *            the state to set
	 */
	public void setState(String state) {
		this.state = state;
	}

	/**
	 * @return the ended
	 */
	public boolean isEnded() {
		return ended;
	}

	/**
	 * @param ended
	 *            the ended to set
	 */
	public void setEnded(boolean ended) {
		this.ended = ended;
	}

	/**
	 * @return the suspended
	 */
	public boolean isSuspended() {
		return suspended;
	}

	/**
	 * @param suspended
	 *            the suspended to set
	 */
	public void setSuspended(boolean suspended) {
		this.suspended = suspended;
	}
}
